#include "TimerThread.hpp"

TimerThread::TimerThread(TimerCallback && cb, int init, int interval)
: _timer(std::move(cb), init, interval)
, _thread(std::bind(&Timerfd::start, &_timer))
{}

void TimerThread::start()
{
    _thread.start();
}

void TimerThread::stop()
{
    _timer.stop();
    _thread.join();
}
